package final2107.day01;

import java.util.Scanner;

public class RecursionDemo01 {
    public static void main(String[] args) {
        System.out.println("请输入一个正整数");
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        //求解成
        long result = f(n);
        System.out.println(result);

    }
    //用于求出某个整数的阶乘
    public static long f(int n){
        if (n==1)
            return 1;
        return n*f(n-1);
    }
}
